package com.pure.common.utils;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;

/**
 * @description: 纯粹的字符串工具类
 * @date: 2022-06-25 11:34
 * @since 1.2.0
 **/
@Slf4j
public class PureStringUtils {

    // 普通开户
    public static final String ACCOUNT_ORDINARY = "account:ordinary:workflow";
    // 基础开户
    public static final String ACCOUNT_BASE = "account:base:workflow";
    // 完善开户
    public static final String ACCOUNT_PERFECT = "account:perfect:workflow";

    public static void main(String[] args) {

        String terminal = "商务";
        String $1 = "底价";
        String $2 = "商务会馆";
        String $3 = "商务";

        boolean b = equalsAny(terminal, $1, $2, $3);

        log.info("equalsAny is {}", b);

    }

    public static boolean perMi() {
        String perMi$1 = "account:ordinary:workflow";
        String perMi$2 = "account:base:workflow";
        String perMi$3 = "account:perfect:workflow";

        String perMi = "account:base:workflow";
        if (ACCOUNT_ORDINARY.equals(perMi) || ACCOUNT_PERFECT.equals(perMi)) {

            log.info("开户类型 = {}", perMi);
        }
        return false;
    }

    public static boolean isEmpty(CharSequence cs) {

        return StringUtils.isEmpty(cs);
    }

    public static boolean equalsAny(final CharSequence string, final CharSequence... searchStrings) {

        return StringUtils.equalsAny(string, searchStrings);
    }

}
